Conversation
Import @wordpress/format-library to register standard rich text formats (bold, italic, link, code, strikethrough, etc.) and their keyboard shortcuts. Press This uses BlockEditorProvider directly, which doesn't include these by default. Also adds docs/keyboard-shortcuts.md documenting which shortcuts are available and which are not yet supported. See #81
There was a problem hiding this comment.
Pull request overview
This PR restores standard Gutenberg rich-text formatting shortcuts in Press This by ensuring core format types are registered when the app boots (since Press This uses BlockEditorProvider rather than EditorProvider).
Changes:
- Add
@wordpress/format-libraryas an application dependency. - Import
@wordpress/format-libraryin the JS entry point so format types/shortcuts register on load. - Add documentation describing which keyboard shortcuts are (and aren’t) available in Press This.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/index.js | Imports @wordpress/format-library at startup to register core rich-text formats and shortcuts. |
| package.json | Adds @wordpress/format-library to dependencies. |
| package-lock.json | Locks the newly added dependency and resulting transitive dependency graph updates. |
| docs/keyboard-shortcuts.md | Documents available/unavailable shortcuts in Press This vs the full editor. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "@wordpress/edit-post": "^8.37.0", | ||
| "@wordpress/editor": "^14.37.0", | ||
| "@wordpress/element": "^6.37.0", | ||
| "@wordpress/format-library": "^5.37.0", | ||
| "@wordpress/i18n": "^6.10.0", | ||
| "@wordpress/icons": "^11.4.0", | ||
| "@wordpress/rich-text": "^7.37.0" |
There was a problem hiding this comment.
Adding @wordpress/format-library updates the lockfile to include @wordpress/ui which declares engines of Node >=20.10.0 and npm >=10.2.3 (see package-lock). To avoid confusing install-time engine warnings (or failures when engine-strict is enabled), consider declaring an explicit engines requirement in this repo’s package.json (and aligning CI/tooling accordingly).
Summary
Import
@wordpress/format-libraryto register standard rich text format types and their keyboard shortcuts. Press This usesBlockEditorProviderdirectly rather than the fullEditorProvider, which means format-library isn't initialized automatically. Without it, shortcuts like Ctrl+K (link), Ctrl+B (bold), and Ctrl+I (italic) don't work.@wordpress/format-libraryas a dependencydocs/keyboard-shortcuts.mddocumenting which Gutenberg shortcuts are available in Press This and which aren'tSee #81
Test plan